<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2024-04-03
  Time: 14:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<form name="form1" action="forward.jsp" method="post" >
    程序示例链接：
    <select name="goaddress" onchange="javascript:form1.submit()">
        <option value="novalue"></option>
        <option value="1">实例13</option>
        <option value="2">实例14</option>
    </select>
</form>
<% // forward应用示例Java程序片
    String s=null;
    s=request.getParameter("goaddress");
    if(s!=null)
    {  switch(s.charAt(0))
    {  case '1':
%>
<jsp:forward page="count.jsp"></jsp:forward>
<%
        break;
    case '2':
%>
<jsp:forward page="include.jsp"></jsp:forward>
<%
                break;
            default:
                out.println("您没有选择。");
        }
    }
    else
        out.println("您没有选择。");
%>

</body>
</html>
